from selenium.webdriver.common.by import By

from common.readelement import Element
from page.baseage_rd import WebPageRD

app_elements = Element['app_test']
class AppPage(WebPageRD):

    def create_app(self):
        pass

    def get_app(self, key):
        # 输入前先清空
        ele = self.driver.find_element(By.XPATH, "//input[@class='ant-input']")
        ele.clear()
        ele.send_keys(key)
        count = self.driver.find_elements(By.XPATH, "//tr[@class='ant-table-row g-cp ant-table-row-level-0']")
        return len(count)